home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / tcp / DynamicIP.lha / Online.vlt < prev    next >
Text File  |  1994-12-28  |  954b  |  28 lines

  1. /*\
  2.  *   Online: (28-Dec-94)
  3.  *   This script is called from VLT to parse the logfile for
  4.  *   the IP number.  It currently searches for a line...
  5.  *
  6.  *     IP Address: ???.???.???.???
  7.  *
  8.  *   and grabs the IP adress, running AmiTCP:bin/StartNet with
  9.  *   the IP address as the paramater.
  10.  *
  11.  *   IanSmith@psu.edu (Ian M. Smith)
  12. \*/
  13.  
  14. Call Open(In, "AmiTCP:Slip.Data", "R")
  15. Do Until Left(Line,11)= "IP Address:"   /* Search for the line starting with */
  16.  Line=ReadLN(In)                        /* "IP Address:"                     */
  17. End
  18. IPAddress=Word(Line,3)                  /* The 3rd word is the IP address    */
  19. Call Close(In)
  20. Call Open(Out, "RAM:StartNet.Temp$", "W")
  21. Call WriteLN(Out, "Cd AmiTCP:bin")
  22. Call WriteLN(Out, "StartNet "||IPAddress)
  23. Call WriteLN(Out, "EndCLI")
  24. Call Close(Out)
  25. Address Command "NewCLI CON:0/22/800/150/AmiTCP-StartUp/AUTO/CLOSE/NOWAIT From Ram:StartNet.Temp$"
  26. Delay(60)
  27. Address Command "Delete QUIET Ram:StartNet.Temp$"
  28.